package com.briup.MR.Sort.SecondSort;

import org.apache.hadoop.io.DoubleWritable;
import org.apache.hadoop.mapreduce.Partitioner;


public class SecordPartitioner
        extends Partitioner<YearTemp, DoubleWritable> {
    public int getPartition(YearTemp yearTemp, DoubleWritable doubleWritable, int numPartitions) {
        return (Math.abs(yearTemp.getYear().hashCode())*127)%numPartitions;
    }
}

